package com.baidumap.administrator.happystudy.ui;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.LinearLayout;
import android.widget.Toast;

import com.baidumap.administrator.happystudy.R;

/**
 * Created by C on 2017/3/26.
 */
public class ImageActivity extends Activity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_image);
        LinearLayout ret = (LinearLayout) findViewById(R.id.ret);
        LinearLayout left = (LinearLayout) findViewById(R.id.left);
        LinearLayout right = (LinearLayout) findViewById(R.id.right);
        ret.setOnClickListener(this);
        left.setOnClickListener(this);
        right.setOnClickListener(this);


    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.ret:
                finish();
                break;
            case R.id.left:
                Toast.makeText(this, "向左", Toast.LENGTH_SHORT).show();
                break;
            case R.id.right:
                Toast.makeText(this, "向右", Toast.LENGTH_SHORT).show();
                break;
        }
    }
}
